package lv.yasa.manager;

import android.app.AlertDialog;
import lv.yasa.ISTCallback;
import lv.yasa.YasaActivity;
import lv.yasa.data.Category;
import lv.yasa.data.ISTAdapter;
import lv.yasa.data.ISTItem;
import lv.yasa.helper.SoundHelper;

public class YasaManager  implements ISTCallback  {
	private static YasaManager instance = null;	
	
	private YasaActivity activity;	
		
	public boolean recordFraze = false;
	
	public static YasaManager getInstance()
	{
		return instance;
	}
	
	public static void init(YasaActivity activity)
	{
		instance = new YasaManager();
		instance.activity = activity;
	}

	public void onISTClick(Object clickObject) {
		// TODO Auto-generated method stub
		if (clickObject instanceof Category)
		{
			Category c = (Category)clickObject;
			activity.showCategoryItems(c);
		}
		else if (clickObject instanceof ISTItem)
		{
			ISTItem item = (ISTItem)clickObject;
			SoundHelper.getInstance().play(item.soundPath);
		}
	}
	
}
